fix(donate): Set .edu membership payment status to succeeded#7211
Merged
albertisfu merged 3 commits intomainfrom Apr 10, 2026
Merged
fix(donate): Set .edu membership payment status to succeeded#7211albertisfu merged 3 commits intomainfrom
.edu membership payment status to succeeded#7211albertisfu merged 3 commits intomainfrom
Conversation
.edu membership webhooks from Neon don't include a payments array, causing the payment_status to default to PENDING. Since .edu memberships are free, treat missing payment info as SUCCEEDED.
albertisfu
reviewed
Apr 10, 2026
Contributor
albertisfu
left a comment
There was a problem hiding this comment.
Thanks @ERosendo this looks good. Just the suggestion we talked about.
cl/donate/api_views.py
Outdated
| membership_level == NeonMembershipLevel.EDU | ||
| and not membership_data["paymentStatus"] | ||
| ): | ||
| payment_status = MembershipPaymentStatus.SUCCEEDED |
Contributor
There was a problem hiding this comment.
In case Neon’s logic changes in the future and it starts sending payment info with a failed status, It seems like a good idea to log an error so we can review the membership manually and update the logic accordingly.
albertisfu
approved these changes
Apr 10, 2026
Contributor
albertisfu
left a comment
There was a problem hiding this comment.
Looks good. Thank you.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
.edumembership webhooks from Neon CRM don't include apaymentsarray in their payload. Our code in_get_membership_datareturns an empty string when no payments are present, and_map_payment_status_valuemaps that toPENDINGvia its default case. Since.edumemberships are free, no subsequent payment webhook ever arrives to correct this, leaving these records permanently stuck as "Awaiting payment."This PR updates
_handle_membership_creationto check if the membership is EDU-level and the webhook had no payment info. When both are true,payment_statusis set toSUCCEEDEDinstead of falling through to the defaultPENDING.Existing affected records will be corrected via a script in production after this is merged.
Deployment
This PR should:
skip-deploy(skips everything below)skip-web-deployskip-celery-deployskip-cronjob-deployskip-daemon-deploy